/* 游戏样式 */
@import './common.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
}
body {
  min-width: 320px;
  max-width: 1300px;
  background-color: #f5deb3;
  margin: 2rem auto;
}
/* 游戏头部样式 */
header {
  display: block;
  width: 100%;
  margin: 0.5rem auto 0.2rem;
  text-align: center;
  font-size: 0.48rem;
  font-family: Arial, Helvetica, sans-serif;
}
/* 游戏标题样式 */
header h1 {
  font-weight: 700;
  margin-top: 0.4rem;
  color: #8f7a66;
}
/* 新游戏按钮 */
header a,
.gameover a {
  display: block;
  width: 2.4rem;
  margin: 0.2rem auto;
  padding: 0.2rem;
  background-color: #8f7a66;
  color: #fff;
  font-size: 0.32rem;
  border-radius: 0.2rem;
  transition: transform 0.2s ease-in-out;
  box-shadow: 0 0.04rem 0.08rem rgba(0, 0, 0, 0.3);
}
/* 新游戏按钮鼠标悬浮样式 */
header a:hover,
.gameover a:hover {
  background-color: #9f8b77;
}
header a:active,
.gameover a:active {
  transform: scale(0.9);
}
/* 游戏分数样式 */
header p {
  font-size: 0.48rem;
  margin: 0.4rem auto;
  color: #9f8b77;
}

/* 游戏主体 */
.grid-container {
  position: relative;
  width: 9.2rem;
  height: 9.2rem;
  background-color: #bbada0;
  margin: 0.4rem auto;
  border-radius: 0.2rem;
  box-shadow: 0 0.06rem 0.1rem rgba(0, 0, 0, 0.3), 0 0 0.1rem rgba(0, 0, 0, 0.3) inset;
}
.grid-cell {
  position: absolute;
  width: 2rem;
  height: 2rem;
  background-color: #ccc0b3;
  border-radius: 0.12rem;
  box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0.3);
}
.number-cell {
  position: absolute;
  font-size: 0.64rem;
  font-weight: 700;
  text-align: center;
  line-height: 2rem;
  border-radius: 0.12rem;
}
.gameover {
  position: absolute;
  top: -0.4rem;
  left: -0.4rem;
  padding-top: 3rem;
  width: 10rem;
  height: 10rem;
  font-size: 0.64rem;
  text-align: center;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0.4rem;
  z-index: 2;
}
.gameover > span {
  display: block;
  margin: 0.6rem;
  font-size: 1.2rem;
  line-height: 1.2rem;
}
